﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace EnCor.ModuleLoader
{
    public class ServiceContractConfig : ConfigurationElement
    {
        private const string Config_DataType = "dataType";
        private const string Config_Type = "type";

        public ServiceContractConfig()
        { 
        
        }

        public ServiceContractConfig(string typeName)
        {
            this[Config_Type] = typeName;
        }


        [ConfigurationProperty(Config_Type)]
        public string TypeName
        {
            get
            {
                return (string)this[Config_Type];
            }
        }

        public Type Type
        {
            get
            {
                return Type.GetType(TypeName);
            }
        }
    }
}
